<?php

namespace Admin;

use Admin\Model\ProductModel;

class Module {

    public function getConfig() {
        return include __DIR__ . '/config/module.config.php';
    }

    public function getAutoloaderConfig() {
        return array(
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
    
    public function getServiceConfig() {
        return array(
            'factories' => array(
                'ProductAminModel' => function($sm){
                    $adapter = $sm->get('Zend\Db\Adapter\Adapter');
                    $productAdminModel = new ProductModel($adapter);
                    return $productAdminModel;
                },
                'AdminAuthenticationService' => function($sm){
                    $authService = new \Zend\Authentication\AuthenticationService();
                    return $authService;
                }        
            )
        );
    }

}
